package com.hockeo.shared.domain.persistent;

import com.extjs.gxt.ui.client.data.BeanModelTag;
import com.hockeo.client.metadata.IMetadataTag;
import com.hockeo.shared.domain.AbstractDomain;
import com.hockeo.tinygds.TKey;
import com.hockeo.tinygds.annotation.TEntity;
import com.hockeo.tinygds.annotation.TId;
import com.hockeo.tinygds.annotation.TName;
import com.hockeo.tinygds.wrappers.TGeoPt;

/**
 * Represents a club.
 *
 * @version $Id$
 * @author jjanke
 */
@TEntity
public class Club extends AbstractDomain<Club, String> implements IMetadataTag, BeanModelTag
{
  @TId
  private String            d_strId;

  @TName( "name" )
  private String            d_strName;

  @TName( "association" )
  private TKey<Association> d_association;

  @TName( "logo" )
  private TKey<Image>       d_logo;

  @TName( "country" )
  private String            d_strCountry;

  @TName( "location" )
  private TGeoPt            d_location;

  /** Argument-less constructor for TinyGDS and GWT/RPC. */
  private Club()
  {}

  public String getName()
  {
    return d_strName;
  }

  public TKey<Association> getAssociation()
  {
    return d_association;
  }

  public String getCountry()
  {
    return d_strCountry;
  }

  public TGeoPt getLocation()
  {
    return d_location;
  }

  @Override
  public String getEntityName()
  {
    return "Club";
  }

  @Override
  public String getId()
  {
    return d_strId;
  }
}
